#include <iostream>
using namespace std;

int main()
{
	string s1("hello world");
	cout << s1 << endl;
	for (auto e : s1)
	{
		cout << e << " ";
	}
	cout << endl;

	string::iterator it1 = s1.begin();
	while (it1 != s1.end())
	{
		cout << *it1 << " ";
		it1++;
	}
	cout << endl;

	for (size_t i = 0; i < s1.size(); i++)
	{
		cout << s1[i] << " ";
	}
	cout << endl;

	string s2(s1);
	cout << s2 << endl;

	string s3 = s2;
	cout << s3 << endl;

	string s4(s2, 1, 2);
	cout << s4 << endl;

	string s5("6666", 3);
	cout << s5 << endl;

	string s6(11, '@');
	cout << s6 << endl;

	reverse(s1.begin(), s1.end());
	cout << s1 << endl;
	return 0;
}